package com.jjh.springframework.bean.factory;

import com.jjh.springframework.bean.BeansException;

import java.util.Map;

/**
 * ListableBeanFactory
 *
 * @author jjh
 * @date 2021/06/20
 **/
public interface ListableBeanFactory extends BeanFactory {

    /**
     * 按照类型返回bean实例
     * @param <T>
     * @return
     * @throws BeansException
     */
    <T> Map<String, T> getBeansOfType(Class<T> type) throws BeansException;

    /**
     * 返回注册表中所有的bean名称
     * @return
     */
    String[] getBeanDefinitionNames();
}
